package com.fu.esdemo.service;

import com.fu.esdemo.bean.DocBean;
import org.springframework.data.domain.Page;

import java.util.Iterator;
import java.util.List;

public interface IElasticService
{
    void insertIndex() throws Exception;

    void searchIndex() throws Exception;

    void searchAggregation() throws Exception;

    void searchSuggest(String prefix) throws Exception;

    void createIndex();
 
    void deleteIndex(String index);
 
    void save(DocBean docBean);
 
    void saveAll(List<DocBean> list);
 
    Iterator<DocBean> findAll();
 
    Page<DocBean> findByContent(String content);
 
    Page<DocBean> findByFirstCode(String firstCode);
 
    Page<DocBean> findBySecordCode(String secordCode);
 
    Page<DocBean> query(String key);


 
}